package com.ncsc.erp.model;
// Generated 20 มิ.ย. 2557, 12:55:43 by Hibernate Tools 3.4.0.CR1


import java.math.BigDecimal;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * SdCustUserParameter generated by hbm2java
 */
@Entity
@Table(name="sd_cust_user_parameter"
    ,catalog="ncsc_erp"
)
public class SdCustUserParameter  implements java.io.Serializable {


     private SdCustUserParameterId id;
     private SdCustUserAccount sdCustUserAccount;
     private SysParameterMaster sysParameterMaster;
     private String custUserParamStringVal;
     private BigDecimal custUserParamNumberVal;

    public SdCustUserParameter() {
    }

	
    public SdCustUserParameter(SdCustUserParameterId id, SdCustUserAccount sdCustUserAccount, SysParameterMaster sysParameterMaster) {
        this.id = id;
        this.sdCustUserAccount = sdCustUserAccount;
        this.sysParameterMaster = sysParameterMaster;
    }
    public SdCustUserParameter(SdCustUserParameterId id, SdCustUserAccount sdCustUserAccount, SysParameterMaster sysParameterMaster, String custUserParamStringVal, BigDecimal custUserParamNumberVal) {
       this.id = id;
       this.sdCustUserAccount = sdCustUserAccount;
       this.sysParameterMaster = sysParameterMaster;
       this.custUserParamStringVal = custUserParamStringVal;
       this.custUserParamNumberVal = custUserParamNumberVal;
    }
   
     @EmbeddedId

    
    @AttributeOverrides( {
        @AttributeOverride(name="custUserNo", column=@Column(name="CUST_USER_NO", nullable=false) ), 
        @AttributeOverride(name="custUserParamNo", column=@Column(name="CUST_USER_PARAM_NO", nullable=false) ) } )
    public SdCustUserParameterId getId() {
        return this.id;
    }
    
    public void setId(SdCustUserParameterId id) {
        this.id = id;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CUST_USER_NO", nullable=false, insertable=false, updatable=false)
    public SdCustUserAccount getSdCustUserAccount() {
        return this.sdCustUserAccount;
    }
    
    public void setSdCustUserAccount(SdCustUserAccount sdCustUserAccount) {
        this.sdCustUserAccount = sdCustUserAccount;
    }

@ManyToOne(fetch=FetchType.LAZY)
    @JoinColumn(name="CUST_USER_PARAM_NO", nullable=false, insertable=false, updatable=false)
    public SysParameterMaster getSysParameterMaster() {
        return this.sysParameterMaster;
    }
    
    public void setSysParameterMaster(SysParameterMaster sysParameterMaster) {
        this.sysParameterMaster = sysParameterMaster;
    }

    
    @Column(name="CUST_USER_PARAM_STRING_VAL", length=500)
    public String getCustUserParamStringVal() {
        return this.custUserParamStringVal;
    }
    
    public void setCustUserParamStringVal(String custUserParamStringVal) {
        this.custUserParamStringVal = custUserParamStringVal;
    }

    
    @Column(name="CUST_USER_PARAM_NUMBER_VAL", precision=15, scale=4)
    public BigDecimal getCustUserParamNumberVal() {
        return this.custUserParamNumberVal;
    }
    
    public void setCustUserParamNumberVal(BigDecimal custUserParamNumberVal) {
        this.custUserParamNumberVal = custUserParamNumberVal;
    }




}


